<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        ul,
        ol,
        li {
            list-style: none;
        }

        .box {
            margin: 50px auto;
            /* width: 600px; */
            height: 400px;
            /* border: 10px solid #333; */
        }

        .box>ul {
            width: 100%;
            height: 50px;
            background-color: pink;
        }

        .box>ul>li {
            float: left;
            width: 200px;
            height: 100%;
            line-height: 50px;
            font-size: 30px;
            text-align: center;
            cursor: pointer;
        }

        .box>ol {
            position: relative;
            width: 100%;
            height: 350px;
        }

        .box>ol>li {
            width: 100%;
            height: 100%;
            position: absolute;
            left: 0;
            top: 0;
            line-height: 350px;
            text-align: center;
            font-size: 50px;
            background-color: rgb(192, 255, 226);
            display: none;
        }

        .box>ol>li.active {
            display: block;
        }

        .box>ul>li.active {
            background-color: orange;
        }
    </style>
</head>

<body>
    <div class="box">
        <ul>
            <li class="active">1</li>
            <li>2</li>
            <li>3</li>
        </ul>
        <ol>
            <li class="active">1</li>
            <li>2</li>
            <li>3</li>
        </ol>
    </div>
    <div class=" box box1">
        <ul>
            <li class="active">1</li>
            <li>2</li>
            <li>3</li>
            <li>4</li>
        </ul>
        <ol>
            <li class="active">1</li>
            <li>2</li>
            <li>3</li>
            <li>4</li>
        </ol>
    </div>
    <div class=" box box2">
        <ul>
            <li class="active">1</li>
            <li>2</li>
            <li>3</li>
            <li>4</li>
            <li>5</li>
            
        </ul>
        <ol>
            <li class="active">1</li>
            <li>2</li>
            <li>3</li>
            <li>4</li>
            <li>5</li>
        </ol>
    </div>
</body>
<script src="tab.js"></script>
<script>
    new Tabs('.box')
    let t2 = new Tabs('.box1',{type: 'click'})
    let t3 = new Tabs('.box2',{type: 'mouseover'})
</script>

</html>